/*
 * @Author: bankeyu-dell 573569790@qq.com
 * @Date: 2022-10-08 15:53:59
 * @LastEditors: bankeyu-dell 573569790@qq.com
 * @LastEditTime: 2022-10-13 00:55:39
 * @FilePath: \fast-vue3\src\api\chat\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { post } from '/@/utils/http/axios';
enum URL {
  chatdel = '/msvc/chatdel', // 删除聊天信息接口
  chatdetail = '/msvc/chatdetail', // 获取聊天信息接口
  chatlist = '/msvc/chatlist', // 获取好友/群聊天列表接口
  translateSingle = '/msvc/translate-single', // 翻译信息接口
}

export interface TranslateSingleData {
  id: number;
  customerId: number;
  content: string;
}

export interface ChatdetailData {
  customerGroupId: number;
  pageNo: number;
  pageSize: number;
  random: string;
  timestamp: string;
}

export interface ChatlistData {
  customerId: number;
  pageNo: number;
  pageSize: number;
  random: string;
  timestamp: string;
}

export interface IdData {
  id: number;
}
const chatdel = async (data: IdData) => post<any>({ url: URL.chatdel, data });
const chatdetail = async (data: ChatdetailData) => post<any>({ url: URL.chatdetail, data });
const chatlist = async (data: ChatlistData) => post<any>({ url: URL.chatlist, data });
const translateSingle = async (data: TranslateSingleData) => post<any>({ url: URL.translateSingle, data });
export { chatdel, chatdetail, chatlist, translateSingle };
